package servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet(name = "Servlet1")
public class Servlet1 extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.getWriter().print("sssss");
        this.getInitParameter("xx");
//        System.out.println("servlet1------------------------");
//        request.setAttribute("requestKey","requestValue");
//        //转发
//        request.getRequestDispatcher("jsp5.jsp").forward(request,response);
        //重定向
        //response.sendRedirect("jsp5.jsp");
    }


}
